#include <commander.hpp>
#include <remoter.hpp>

static Commander* s_Commander = nullptr;

Commander* Commander::Instance()
{
	if (s_Commander == nullptr)
	{
		s_Commander = new Commander();
	}
	return s_Commander;
}

Commander::Commander()
{
}

Commander::~Commander()
{
}

bool Commander::Handler(msg_command_s* cmd)
{
	if (cmd == nullptr)
	{
		return false;
	}

	if (cmd->command == MSG_CMD_E_RC_CALIBRATION)
	{
		Remoter::Instance()->SwitchCaliState(E_RC_CALI_PREPARE);
	}

	return true;
}
